angular.module('myApp',[])
    .controller('stuController',function ($scope) {
        // $scope.appendName='John';

        $scope.getDataFromService =function () {
            var sendMsg = '';
            $.ajax({
                url: "sendMessageToAngular",
                type: "POST",
                dataType: "json",
                async:false,
                success: function (result) {
                    console.log("结果="+result.extMsg.message);
                    sendMsg=result.extMsg.message
                    $scope.appendName=result.extMsg.message
                }
            });
            $scope.appendName=sendMsg;
            console.log("ajax外部结果="+sendMsg);
            return sendMsg;
        }
    });